package com.lesson1.single;

/**
 * 单一职责原则
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/8/27 8:29
 */
public class SingleResponse1
{
    public static void main(String[] args)
    {
        Vehicle vehicle = new Vehicle();
        vehicle.run("飞机");
        vehicle.run("坦克");
        vehicle.run("火车");
    }
}

//交通工具类
class Vehicle{
    public void run(String vehicle){
        System.out.println(vehicle+" 在公路上运行。。。");
    }
}